package com.xjl.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
@WebServlet("/out.do")
/**
 * 用户退出
 * @author JianLin_Xu
 *
 */
public class OutServlet extends HttpServlet {
	@Override
	protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		//获取session
		HttpSession session = req.getSession();
		//强制销毁session
		session.invalidate();
		//重定向到Login.jsp
		resp.sendRedirect("/pcshop/admin/login.jsp");
	}
}
